function x_est = mmse_detector(y, H, SNR)
    % MMSE检测器实现
    [Nr, Nt] = size(H);
    noise_var = 10^(-SNR/10);  % 噪声方差
    
    % MMSE权重矩阵
    W_mmse = H' * inv(H*H' + noise_var*eye(Nr));
    
    % MMSE估计
    x_est = W_mmse * y;
    
    % 硬判决
    x_est_real = sign(real(x_est));
    x_est_imag = sign(imag(x_est));
    x_est = x_est_real + 1j*x_est_imag;
end 